import time
import threading


def say():
    for i in range(5):
        print("say hello--")
        time.sleep(1)


def sing():
    for i in range(5):
        print("rapper rapper--")
        time.sleep(1)


def main():
    # 实例化线程对象并运行
    t1 = threading.Thread(target=say)
    t2 = threading.Thread(target=sing)
    t1.start()
    t2.start()

    # 获取程序中运行的所有线程
    # print(threading.enumerate())


if __name__ == '__main__':
    main()
